class Solution:
    def isPowerOfTwo(self, n: int) -> bool:
        t = 1
        for i in range(34):
            if t == n:
                return True
            if t > n:
                return False
            t = t << 1
        return True


if __name__ == '__main__':
    so = Solution()
    s = 4294967297
    r = so.isPowerOfTwo(s)
    print(r)
